Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

josema/ch93710/fix-wrong-username-error #1687

Merged
merged 4 commits into from
Sep 4, 2020

Conversation

josemazo
Copy link
Contributor

@josemazo josemazo commented Sep 3, 2020

GH issue CARTOframes#1466
CH story ch93719

Copy link
Member

@Jesus89 Jesus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good approach! However, some things can be improved in the implementation:

@josemazo
Copy link
Contributor Author

josemazo commented Sep 4, 2020

Re-CR, please!

Yes, the NotFoundException stuff is totally necessary, thank you!

try:
return func(*args, **kwargs)

except CartoException as e:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would simplify this to

except NotFoundException:
    raise Exception('Resource not found')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't work :(

The exception is a CartoException, created with a NotFoundException as the only parameter, so we need to inspect the args.

@Jesus89 Jesus89 merged commit 351f9cc into develop Sep 4, 2020
@Jesus89 Jesus89 deleted the josema/ch93710/fix-wrong-username-error branch September 4, 2020 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants